-
Notifications
You must be signed in to change notification settings - Fork 216
feat: Add SGLang rollout backend and tests #1674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
…a server Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
…p servers Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
sglang: add 1B example Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Ryan <[email protected]> Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
- Convert SGLangConfig from regular class to TypedDict inheriting GenerationConfig - Align structure with VllmConfig pattern for consistency - Mark all fields as NotRequired for backward compatibility - Add sglang_kwargs field for additional ServerArgs parameters - Add type casting in grpo.py for type safety This maintains backward compatibility while aligning with the existing generation config structure pattern. Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
Signed-off-by: Zhuoran Yin <[email protected]>
Co-authored-by: Terry Kong <[email protected]> Signed-off-by: Night <[email protected]>
|
hey @RolaoDenthu . i'm trying to get the examples in this PR to run and running into some issues. I'll submit a PR against your branch tomorrow with some fixes |
Signed-off-by: RolaoDenthu <[email protected]>
Signed-off-by: RolaoDenthu <[email protected]>
Signed-off-by: RolaoDenthu <[email protected]>
Signed-off-by: RolaoDenthu <[email protected]>
|
@RolaoDenthu PR for your review: RolaoDenthu#1 Also when i run: I get is sgl_kernel supposed to be a dependency? |
|
@RolaoDenthu From poking around in sglang's source I think this is due to the sgl-kernel bdist wheel being built against torch 2.8. We currently need to be on torch 2.9. I'm looking at sglang 0.5.5, and the bdist wheel seems to be built against torch 2.9 despite the sglang sdist wheel specifying torch 2.8; not sure if I'm reading that correctly |
|
@RolaoDenthu also another challenge we need to overcome is the fact that the extras |
Thank you! I have checked before and sgl-kernel support torch 2.8.0 and after is 2.9.1. So I can't find an appropriate version as nemo ask for torch 2.9.0. |
|
@RolaoDenthu we took a look and it seems possible to decouple sglang from dtensor v2 (from consulting with @yuki-97 ). that would help a good deal with the complexity. I'll give that a try (will need to copy some sglang source needed to do so). I think the bigger issue is the |
I checked with others in the sglang community, and the feedback was that there are known issues with torch 2.9.0 + cudnn. If we really need to stay on 2.9.0 then we can only build sgl-kernel from source. I will try on this. |
|
Thanks for checking. I'll give it a try as well. Do you have a link to the issues for my understanding? We can bump to 2.9.1 as well, but usually we encounter many issues when upgrading torch, so maybe we can first see if there's a way to not upgrade torch first before resorting to the upgrade |
|
pytorch/pytorch#166643 I think this is the issue. |
|
Regarding sgl_kernel problem, I think @RolaoDenthu should try see if compile-from-source works for sgl_kernel + torch 2.9.0; we can't globally bump torch to 2.9.1, until vllm releases v0.14.0 which is the first that's compatible with torch 2.9.1. @terrykong Regarding vllm and sglang dependency co-existing in the |
Signed-off-by: RolaoDenthu <[email protected]>
| - NRL_SGL_KERNEL_SOURCE_PATH (accepts either sgl-kernel root or sglang root) | ||
| - git clone NRL_SGL_KERNEL_REPO at NRL_SGL_KERNEL_SOURCE_REF into cache_root | ||
| """ | ||
| raw = os.environ.get("NRL_SGL_KERNEL_SOURCE_PATH", "").strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is user expected to create this wheel file by themselved?
I think this way is hard to maintain, we should try to make uv install sgl-kernel from building-from scratch. Starting an offline discussion about it
Signed-off-by: Terry Kong <[email protected]>
Signed-off-by: Terry Kong <[email protected]>
Signed-off-by: Terry Kong <[email protected]>
automodel extra + copy sglang specific utils to avoid dtensor v2 needing all of sglang Signed-off-by: Terry Kong <[email protected]>
Signed-off-by: Terry Kong <[email protected]>
Signed-off-by: Terry Kong <[email protected]>
few changes
What does this PR do ?
Add comprehensive test coverage for SGLang generation backend, including functional tests, unit tests, and nightly tests.
Usage
Before your PR is "Ready for review"
Pre checks:
Summary by CodeRabbit
Release Notes
New Features
Configuration
Tests
✏️ Tip: You can customize this high-level summary in your review settings.